# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:  Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-compress-raw-zlib
_pkgname=Compress-Raw-Zlib
pkgver=2.096
pkgrel=0
pkgdesc="Perl low-level interface to zlib compression library"
url="https://metacpan.org/release/Compress-Raw-Zlib"
arch="all"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-dev"
source="https://cpan.metacpan.org/authors/id/P/PM/PMQS/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete

	# man pages are already provided by perl-doc
	rm -rf "$pkgdir"/usr/share/man
}

sha512sums="9fbfd21fcf85f600f05ebfed8206a5e36e37242b53eaa5f2a52a88a0a88b2d32e201f9561a157efe98630ceba63e9d098fe6349ace2bb17e0fcae42fd1f0f56b  Compress-Raw-Zlib-2.096.tar.gz"
